home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINPROGS / RFDML112.ZIP / UNIX_CIS.SCR < prev    next >
Text File  |  1993-11-14  |  19KB  |  708 lines

  1. ;------------------------------------------------------
  2. ;
  3. ;UNIX.SCR --- The script file for UNIX (world.std.com)
  4. ;
  5. ;------------------------------------------------------
  6. ;
  7. ;   We begin with the format specifiers to which allow
  8. ;the script to identify where the MailId, RealName,
  9. ;and Subject texts are in a newly downloaded letter.
  10. ;
  11. Format
  12. Subject: $SUBJECT$\n
  13. Subj: $SUBJECT$\n
  14. From: "$NAME$" <$UID$>\n
  15. From: ""$NAME$"" <$UID$>\n
  16. From: $NAME$<$UID$>\n
  17. From: $UID$ ($NAME$)\n
  18. From: $UID$ \n
  19. From: $UID$\n
  20. Endformat
  21. ;------------------------------------------------------
  22. ;
  23. ;   Next is a set of aliases which determine various
  24. ; items such as where some of the standard commands
  25. ; like '/usr/ucb/mail' live.
  26. ;
  27. Alias sendmail '/usr/ucb/mail '
  28. Alias readmail '/usr/ucb/mail'
  29. Alias saveletter 's '
  30. Alias deleteletter 'd '
  31. Alias quitmail 'q'
  32. Alias mailnull '#'
  33. Alias mailshellesc '!'
  34. Alias rm '/bin/rm -f '
  35. Alias echo '/bin/echo '
  36. Alias cat '/bin/cat '
  37. Alias logoff 'exit'
  38. ;------------------------------------------------------
  39. ;
  40. ; The following aliases determine the various prompts the
  41. ; script will look for.  The most important one is the
  42. ; 'prompt' alias, which will need to be adjusted to match
  43. ; the prompt that your UNIX host gives.
  44. ;
  45. Alias prompt '\nworld%'
  46. Alias mailprompt '\n& '
  47. Alias subjectprompt '\nSubject: '
  48. Alias ccprompt1 'Cc:'
  49. Alias ccprompt2 'CC:'
  50. Alias ccprompt3 'cc:'
  51. Alias loginprompt '\nlogin: '
  52. Alias passwdprompt '\nPassword:'
  53. Alias havemailprompt 'message'
  54. Alias nomailprompt 'No mail'
  55. ;
  56. ; If you want to append your ~/.signature file to every outgoing
  57. ; message, set the following alias to SEND_SIG, otherwise set it
  58. ; to NO_SIGNATURE:
  59. ;
  60. Alias signature NO_SIGNATURE
  61. ;
  62. ;------------------------------------------------------
  63. ;
  64. ; The following aliases determine what the script will look
  65. ; for to determine that we've successfully logged in
  66. ; (banner1-3), and what it will look for to determine that
  67. ; we've successfully logged out (logoffbanner1-2)
  68. ;
  69. Alias banner1 'Public Access Unix'
  70. Alias banner2 'New World'
  71. Alias banner3 '\nLast login:'
  72. Alias logoffbanner1 %loginprompt%
  73. Alias logoffbanner2 'closed'
  74. ;------------------------------------------------------
  75. ;
  76. ; The following alias determines what intermediate network
  77. ; will be assumed.  It can be one of the following:
  78. ;
  79. ;    DIRECT    Direct connection to the host (default)
  80. ;    DIRLAT    Direct connection to a LAT
  81. ;    CIS    Connect through CIS Packet Net
  82. ;
  83. Alias connectype CIS
  84. ;
  85. ; The following alias should be set TRUE if your modem
  86. ; drops carrier every time you make a connection.  This
  87. ; alias simply forces the script to wait 2 seconds for
  88. ; the connection to settle before starting the script.
  89. ;
  90. Alias waitasec FALSE
  91. ;
  92. ;------------------------------------------------------
  93. ;
  94. ; The following aliases define the connection and password
  95. ; keywords to specify for CIS Packet Net.  They are currently
  96. ; set to connect to world.std.com, and need to be changed
  97. ; for any other UNIX site.
  98. ;
  99. Alias cisconnect 'world,domestic'
  100. Alias cispasswd 'notobvious'
  101. Alias cisconnprompt 'Connected to world.std.com'
  102. ;
  103. ;------------------------------------------------------
  104. ;
  105. ; Set the following aliases to reflect your LAT's prompt if you
  106. ; are connecting through a LAT:
  107. ;
  108. Alias latprompt1 'local>'
  109. Alias latprompt2 'Local>'
  110. ;
  111. ; Set the following alias to be the command which connects your LAT
  112. ; to the host
  113. ;
  114. Alias hostconnect 'open hostname'
  115. ;
  116. ;------------------------------------------------------
  117. ;
  118. ; The following aliases determine the command to use for
  119. ; downloading, and the prompt the upload program will send
  120. ; when it's ready to send data.  Comment these out if
  121. ; you don't want to use ZMODEM:
  122. ;
  123. Alias sz 'sz '
  124. Alias szprompt1 '\nsz: 1 file'
  125. Alias dnloadproto ZMODEM
  126. ;
  127. ; Uncomment the following aliases if you want to use YMODEM
  128. ; as your download protocol:
  129. ;
  130. ;Alias sz 'sb '
  131. ;Alias szprompt1 '\nsb: 1 file'
  132. ;Alias dnloadproto YMODEM
  133. ;
  134. ; Uncomment the following aliases if you want to use XMODEM
  135. ; as your download protocol:
  136. ;
  137. ;Alias sz 'sx '
  138. ;Alias szprompt1 'command now.'
  139. ;Alias dnloadproto XMODEM
  140. ;
  141. ;------------------------------------------------------
  142. ;
  143. ; The following aliases determine the command to use for
  144. ; uploading, and the prompt the upload program will send
  145. ; when it's ready to receive data.  Comment these out if
  146. ; you don't want to use ZMODEM:
  147. ;
  148. ;Alias rz 'rz -a '
  149. ;Alias rzprompt1 'to your modem'
  150. ;Alias rzprompt2 'ready'
  151. ;Alias uploadproto ZMODEM
  152. ;
  153. ; Uncomment the following aliases if you want to use YMODEM
  154. ; as your upload protocol:
  155. ;
  156. ;Alias rz 'rb -a '
  157. ;Alias rzprompt1 'to your modem'
  158. ;Alias rzprompt2 'ready'
  159. ;Alias uploadproto YMODEM
  160. ;
  161. ; Uncomment the following aliases if you want to use XMODEM
  162. ; as your upload protocol:
  163. ;
  164. ;Alias rz 'rx -ac '
  165. ;Alias rzprompt1 'to your modem'
  166. ;Alias rzprompt2 'ready to receive'
  167. ;Alias uploadproto XMODEM
  168. ;
  169. ; Uncomment the following aliases if you want to use KERMIT
  170. ; as your upload protocol:
  171. ; (note that you *must* use kermit on CIS Packet Net)
  172. ;
  173. Alias rz 'kermit -e 256 -r '
  174. Alias rzprompt1 'READY TO RECEIVE'
  175. Alias rzprompt2 'ready to receive'
  176. Alias uploadproto KERMIT
  177. ;
  178. ;------------------------------------------------------
  179. ; This is the main entry-point for the script, which
  180. ; decides which intermediate network will be used to
  181. ; connect to the host.
  182. ;
  183. Begin START
  184.    If %waitasec% Then WAIT_START
  185.    If TRUE Then %connectype%
  186. End
  187. Begin WAIT_START
  188.    Timeout 2 Goto %connectype%
  189. End
  190. ;------------------------------------------------------
  191. ; This is the entry-point for direct-connection to the
  192. ; host.  This state merely sends CR's every three
  193. ; seconds until it sees a login prompt.
  194. ;
  195. Begin DIRECT
  196.    Caption 'connected'
  197.    Cr
  198.    When %loginprompt% Goto USERNAME
  199.    Timeout 3 Goto START
  200. End
  201. ;------------------------------------------------------
  202. ; This is the entry-point for the CIS Packet Net connection
  203. ; to the host.  It merely answers the Host Name and Password
  204. ; prompts for the desired host.  Don't worry about the
  205. ; seemingly 'garbaged' When statements.  They are that way
  206. ; to account for an 8n1 connection to a CIS node which
  207. ; insists on talking 7e1.
  208. ;
  209. Begin CIS
  210.    Caption 'CIS Connect'
  211.    Cr
  212.    When '\nHost Name:' Goto CISHOSTNAME
  213.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  214.    Timeout 3 Goto CIS
  215. End
  216. Begin CISHOSTNAME
  217.    Transmit %cisconnect%
  218.    Cr
  219.    When '\nHost Name:' Goto CISHOSTNAME
  220.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  221.    When '\nPassword:' Goto CISHOSTPASSWORD
  222.    When 'Pß≤≤worΣ:' Goto CISHOSTPASSWORD
  223.    Timeout 30 Goto GIVE_UP
  224. End
  225. Begin CISHOSTPASSWORD
  226.    Transmit %cispasswd%
  227.    Cr
  228.    When '\nHost Name:' Goto CISHOSTNAME
  229.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  230.    When '\nPassword:' Goto CISHOSTPASSWORD
  231.    When 'Pß≤≤worΣ:' Goto CISHOSTPASSWORD
  232.    When %cisconnprompt% Goto CONNECTHOST
  233.    When %loginprompt% Goto USERNAME
  234.    Timeout 30 Goto GIVE_UP
  235. End
  236. Begin CONNECTHOST
  237.    Caption 'logging in'
  238.    When %loginprompt% Goto USERNAME
  239.    Timeout 30 Goto GIVE_UP
  240. End
  241. ;------------------------------------------------------
  242. ; These two states handle connecting to the host
  243. ; once we're directly connected to the LAT
  244. ;
  245. Begin DIRLAT
  246.    Caption 'connected'
  247.    Cr
  248.    When %latprompt1% Goto LOCAL_PROMPT
  249.    When %latprompt2%  Goto LOCAL_PROMPT
  250.    Timeout 3 Goto START
  251. End
  252. Begin LOCAL_PROMPT
  253.    Transmit %hostconnect%
  254.    Cr
  255.    When %latprompt1% Goto LOCAL_PROMPT
  256.    When %latprompt2%  Goto LOCAL_PROMPT
  257.    When %loginprompt% Goto USERNAME
  258.    Timeout 30 Goto GIVE_UP
  259. End
  260. ;------------------------------------------------------
  261. ; At this point we've seen the host's login prompt, and
  262. ; are attempting to log in.
  263. ;
  264. Begin USERNAME
  265.    Transmit $USERNAME
  266.    Cr
  267.    When %passwdprompt% Goto PASSWORD
  268.    When %loginprompt% Goto USERNAME
  269.    Timeout 120 Goto NO_LOGIN
  270. End
  271. Begin PASSWORD
  272.    Transmit $PASSWORD
  273.    Cr
  274.    When %passwdprompt% Goto PASSWORD
  275.    When %loginprompt% Goto USERNAME
  276.    When %banner1% Goto LOGGED_IN
  277.    When %banner2% Goto LOGGED_IN
  278.    When %banner3